package indi.kider.server.applet.api;

import indi.kider.server.applet.model.TenantVo;
import indi.kider.server.applet.service.TempFilterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pers.vankid.common.model.base.CommonResponse;

@RestController
@RequestMapping(value = "tempFilter")
public class TempFilterController {

    @Autowired
    private TempFilterService tempFilterService;

    @PostMapping("verifyTenant")
    public CommonResponse<TenantVo> getTenantHouseInfo(String tenantId) {
        try {
            return CommonResponse.buildGetSuccessResponse(tempFilterService.verifyTenant(Long.valueOf(tenantId)));
        } catch (Exception e) {
            return CommonResponse.buildExceptionResponse(e);
        }
    }

}
